package org.skydiveapp2;

import org.skydiveapplibrary.R;

import android.app.ListFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;

public class BaseListFragment extends ListFragment
{
    @Override 
    public void onCreate(Bundle savedInstanceState)
    { 
    	super.onCreate(savedInstanceState);
    }
    
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
	    		Bundle savedInstanceState)
	{	
	    // Inflate the layout for this fragment
	    View view = inflater.inflate(R.layout.list_view, container, false);
		
		return view;
	}
		
	@Override
	public void onResume()
	{
		super.onResume();
	}
    
	protected void setSubtitleText(int id)
	{
		// set subtitle label
		TextView subtitleTextView = (TextView) getActivity().getActionBar().getCustomView().findViewById(R.id.actionbarSubtitle);
		subtitleTextView.setText(id);
	}
	
	protected void hideTabletSpacer()
	{
		FrameLayout tabletSpacer = (FrameLayout) getView().findViewById(R.id.TabletSpacerFrame);
		
		if (tabletSpacer != null)
			tabletSpacer.setVisibility(View.GONE);
	}
}
